<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class Shipment extends Model
{
    protected $table = 'shipment';

    protected $fillable = ['code', 'express_id'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function express(){
        return $this->belongsTo(Express::class);
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function detail(){
        return $this->hasMany(ShipmentDetail::class);
    }
}
